<%@ page import="java.util.Date" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
    <title>Title</title>
</head>
<body>
    <%
        out.println(new Date());
        int sum = 0;
        for (int i = 0; i <= 100; i++) {
            sum+=i;
        }
        out.println("<h1>sum: </h1>" + sum);
    %>
    <h1>Hello World! <%= sum%> </h1>
    <h1>Hello World! <% new Date();%> </h1>

    <%!
        int i = 0;
        public int getSum(int n) {
            int sum = 0;
            for (int i = 0; i <= n; i++) {
                sum+=i;
            }
            return sum;
        }
    %>

</body>
</html>
